﻿using IncidentesADO;
using IncidentesBE;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Script.Serialization;

namespace IncidentesSOAP
{
    /// <summary>
    /// Summary description for Fnc_Funcionarios
    /// </summary>
    [WebService(Namespace = "http://seguridad.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    [System.Web.Script.Services.ScriptService]
    public class Fnc_Funcionarios : System.Web.Services.WebService
    {

        Fnc_FuncionariosADO _Fnc_FuncionariosADO = new Fnc_FuncionariosADO();
        JavaScriptSerializer jss = new JavaScriptSerializer();

        [WebMethod]
        public string ListarFnc_FuncionariosO_Act()
        {
            var json = "";
            json = jss.Serialize(_Fnc_FuncionariosADO.ListarFnc_FuncionariosO_Act());
            return json;
        }
        [WebMethod]
        public string LoguearFuncionario(string _Usuario, string _Password)
        {
            var json = "";
            json = jss.Serialize(_Fnc_FuncionariosADO.LoguearFuncionario(_Usuario, _Password));
            return json;
        }
        [WebMethod]
        public string TraerFnc_Funcionario(int _Funcionario_id)
        {
            var json = "";
            json = jss.Serialize(_Fnc_FuncionariosADO.TraerFnc_Funcionario(_Funcionario_id));
            return json;
        }
    }
}
